{% block queue %}
<fieldset>
    <legend>Kolejka budowania {{district.queueLength}}/{{district.maxQueueLength}}:</legend>
<ul>
    {% for position in district.queuePositions %}
        <li>{{position.building}} <div class="progressbar" value="55"></div></li>
    {% endfor %}
</ul>
</fieldset>
	<script>
            
        $("div.progressbar").each (function () {
            var element = this;
            console.log($(element).attr("value")); //ok right value
            
            $(element).progressbar({
                    value: parseInt($(element).attr("value"))
                });
            });
	</script>
{% endblock %}